package com.example.ticket.demo.model.table;

import lombok.Data;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

@Data
@Table(name = "t_user")
public class User implements Serializable{

    public User(){
    }

    public User(String id){
        this.id = id;
    }

    public User(String userId, String name, String password, String gender, String email, Date createTime){
        this.userId = userId;
        this.name = name;
        this.password = password;
        this.gender = gender;
        this.email = email;
        this.createTime = createTime;
    }

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private String id;

    @Column(length = 32)
    private String userId;

    @Column(length = 20)
    private String name;

    @Column(length = 32)
    private String password;

    @Column(length = 1)
    private String gender;

    private String email;

    @Column(name = "img_url")
    private String imgUrl;

    @Column(name = "create_time")
    private Date createTime;


}